package com.gel.codegeneration.ai.model.enums;

import lombok.Getter;

/**
 * @BelongsProject: code-generation-platform
 * @BelongsPackage: com.gel.codegeneration.ai.model.enums
 * @Author: gel
 * @CreateTime: 2025-08-22  11:15
 * @Description: TODO
 * @Version: 1.0
 */
@Getter
public enum CodeGenTypeEnum {
    HTML("原生html模式", "html"),
    MULTI_FILE("多文件模式", "multi-file"),
    VUE_PROJECT("Vue 工程模式", "vue_project");


    private final String text;
    private final String value;
    CodeGenTypeEnum(String text, String value) {
        this.text = text;
        this.value = value;
    }
    public static CodeGenTypeEnum getEnumByValue(String value) {
        if(value == null){
            return null;
        }
        for (CodeGenTypeEnum item : CodeGenTypeEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }
}
